package com.pijunn.common

import grails.validation.Validateable;


@Validateable
class MailingAddress {
	String address1
	String address2
	String city
	String state
	String zipCode
	String country

	static constraints = {
		address1(blank: false)
		address2()
		city(blank: false)
		state(blank: false, size: 2..2)
		zipCode(blank: false, matches: /(^\d{5}$)|(^\d{5}-\d{4}$)/)
		country(blank: false, inList: ["US", "CA"])
	}

}
